package com.shangguan.springmvc;

import com.shangguan.springmvc.core.RootConfig;
import com.shangguan.springmvc.web.config.WebGlobalConfig;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

/**
 * @ClassName: WebContainerInitializer
 * @Description:
 * @Author: 一尘
 * @Date: 2020 年 04 月 22 14:03
 * @Version 1.0
 */
public class WebContainerInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
    /*spring核心的相关配置类*/
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[]{RootConfig.class};
    }
     /*mvc相关的配置*/
    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[]{WebGlobalConfig.class};
    }
    /*DispatcherServlet的映射*/
    @Override
    protected String[] getServletMappings() {
        return new String[]{"/"};
    }
}
